﻿<%@ Page Language="C#" AutoEventWireup="True" CodeFile="role_add.aspx.cs" Inherits="EZCRS.HCMS.Web.manage.users.role_add" %>
<%@ Register Src="../usercontrol/titlepage.ascx" TagName="titlepage" TagPrefix="uc2" %>
<%@ Register assembly="Book38.Net.CustomControl" namespace="Book38.Net.CustomControl" tagprefix="cc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    
    <style type="text/css">
<!--
#modules li{
	list-style-type: none;
}
-->
    </style>
<script language="javascript" type="text/javascript">
function SelectAll(e1,e2,e3,e4)
{
  for(var i=0;i<e1.options.length;i++)
  {
           var e = e1.options[i];
           e2.options.add(new Option(e.text, e.value));
           e1.remove(i);
           i=i-1;
   }
   e3.value=getvalue(e4);
}

function getvalue(geto)
{
    var allvalue = "";
    for(var i=0;i<geto.options.length;i++)
    {
        allvalue +=geto.options[i].value + ","; 
    }
    return allvalue.substring(0,allvalue.length-1);
}


function SelectItem(e1,e2,e3,e4)
{
  for(var i=0;i<e1.options.length;i++)
  {
       if(e1.options[i].selected)
       {
           var e = e1.options[i];
           e2.options.add(new Option(e.text, e.value));
           e1.remove(i);
           i=i-1;
       }
  }
  e3.value=getvalue(e4);
}
</script>
</head>
<body>

    <form id="formData" runat="server">
    <uc2:titlepage id="Titlepage1" runat="server" inittitle="<%$ Resources:Site, LabRoleAdd %>"></uc2:titlepage>
    
        <table style="width: 100%;" class="main-table" cellspacing="1">
            <tr class="line-even">
                <td style="width: 13%; " align="right">
                    <asp:Label runat="server" ID="LabRoleRolName" Text="<%$ Resources:Site, LabRoleRolName %>"></asp:Label>：
                </td>
                <td >
                    <cc2:WebTextBox ID="TbxName" runat="server" AllowEmpty="False" MaxLength="50" 
                        Width="200px" CssClass="text-line"><Value>
</Value></cc2:WebTextBox>
                </td>
            </tr>
            <tr class="line-odd">
                <td style="width: 13%; " align="right">
                    <asp:Label runat="server" ID="LabRoleRolModules" Text="<%$ Resources:Site, LabRoleRolModules %>"></asp:Label>：
                </td>
                <td >
				
				<asp:Literal ID="modu" runat="server"></asp:Literal>
                    </td>
            </tr>
            <tr class="line-even" runat=server id="GroupPanel">
                <td style="width: 13%; " align="right">
                    <asp:Label runat="server" ID="LabRoleRolGroup" Text="<%$ Resources:Site, LabRoleRolGroup %>"></asp:Label>：
                </td>
                <td >
				<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="200"><asp:ListBox ID="LbxGCurrent" runat="server" CssClass="text-line" Height="150px" Width="200px">
              </asp:ListBox></td>
    <td width="20" align="center"><p><img src="../../Image/lall.gif" style="cursor: hand;" width="16" height="16" onclick="javascript:SelectAll($F('LbxGCurrent'),$F('LbxGSource'),$F('HidGroup'),$F('LbxGCurrent'))" /></p>
      <p><img src="../../Image/l1.gif" width="16" height="16" style="cursor: hand;" onclick="javascript:SelectItem($F('LbxGCurrent'),$F('LbxGSource'),$F('HidGroup'),$F('LbxGCurrent'))"  /></p>
      <p><img src="../../Image/r1.gif" width="16" height="16" style="cursor: hand;" onclick="javascript:SelectItem($F('LbxGSource'),$F('LbxGCurrent'),$F('HidGroup'),$F('LbxGCurrent'))" /></p>
      <p><img src="../../Image/rall.gif" width="16" height="16" style="cursor: hand;" onclick="javascript:SelectAll($F('LbxGSource'),$F('LbxGCurrent'),$F('HidGroup'),$F('LbxGCurrent'))"/></p></td>
    <td width="200"><asp:ListBox ID="LbxGSource" runat="server" CssClass="text-line" Height="150px" Width="200px">
              </asp:ListBox></td>
  </tr>
</table>
                    <input id="HidGroup" type="hidden" runat="server"/></td>
            </tr>
            <tr class="line-even" id="HotelPanel" runat=server>
                <td style="width: 13%; " align="right">
                    <asp:Label runat="server" ID="LabRoleRolHotel" Text="<%$ Resources:Site, LabRoleRolHotel %>"></asp:Label>：
                </td>
                <td >
				<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="200"><asp:ListBox ID="LbxHCurrent" runat="server" CssClass="text-line" Height="300px" Width="200px">
              </asp:ListBox></td>
    <td width="20" align="center"><p><img src="../../Image/lall.gif" style="cursor: hand;" width="16" height="16" onclick="javascript:SelectAll($F('LbxHCurrent'),$F('LbxHSource'),$F('HidHotel'),$F('LbxHCurrent'))" /></p>
      <p><img src="../../Image/l1.gif" width="16" height="16" style="cursor: hand;" onclick="javascript:SelectItem($F('LbxHCurrent'),$F('LbxHSource'),$F('HidHotel'),$F('LbxHCurrent'))"  /></p>
      <p><img src="../../Image/r1.gif" width="16" height="16" style="cursor: hand;" onclick="javascript:SelectItem($F('LbxHSource'),$F('LbxHCurrent'),$F('HidHotel'),$F('LbxHCurrent'))" /></p>
      <p><img src="../../Image/rall.gif" width="16" height="16" style="cursor: hand;" onclick="javascript:SelectAll($F('LbxHSource'),$F('LbxHCurrent'),$F('HidHotel'),$F('LbxHCurrent'))"/></p></td>
    <td width="200"><asp:ListBox ID="LbxHSource" runat="server" CssClass="text-line" Height="300px" Width="200px">
              </asp:ListBox></td>
  </tr>
</table>
                    <input id="HidHotel" type="hidden" runat="server"/></td>
            </tr>
			<tr class="line-odd">
                <td style="width: 13%; " align="right">
                    <asp:Label runat="server" ID="LabRoleRolComment" Text="<%$ Resources:Site, LabRoleRolComment %>"></asp:Label>：
                </td>
                <td >
                    <cc2:WebTextBox ID="TbxComment" runat="server" Height="50px" MaxLength="100" 
                        TextMode="MultiLine" Width="400px" CssClass="text-line"><Value>
</Value></cc2:WebTextBox>
                </td>
            </tr>
            <tr class="line-even">
                <td style="width: 13%; " align="right">
                    &nbsp;</td>
                <td >
                    </td>
            </tr>
           <tr class="line-even">
                <td colspan="2" align="center">
                    &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
                    <asp:Button ID="BtnAdd" runat="server" CssClass="bttn"
                        Text="<%$ Resources:Site, ButtonSave %>" OnClick="BtnAdd_Click" />
                    <asp:Button ID="BtnDel" runat="server" CssClass="bttn" OnClick="BtnDel_Click"  Visible="false" Text="<%$ Resources:Site, ButtonDel %>" />
                    <asp:HiddenField ID="HidRolId" runat="server" Value="0" />
                </td>
           </tr> 
        </table>
      
   
    </form>
</body>
</html>
